<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/public.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>出库列表</title>
	<script type="text/javascript" src="${ctx}/js/page.js"></script>
	<script type="text/javascript" src="${ctx}/js/search.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			getPartList();
			exportTable();
			//搜索
			$("#find").click(function(){
				var condition=$("#condition").val();
				var url2="${ctx}/outStore/getFList?condition="+condition;
				if(condition==""){
					getPartList();
				}else{
					search.cseatch(url2);
				}
			});
		});
	</script>

	<script type="text/javascript">
		function getPartList(){
			var url="${ctx}/outStore/getLimitList";
			var count=$("#count").val();
			page.pagePart(url,count);
		}
		function   customPage(obj){
			var type;
			$("#table tr:gt(1)").remove();
			for(var i=0;i<obj.length;i++){
				switch (Number(obj[i].storageOutType)){
					case 1:
						type="配送出库"
						break;
					case 2:
						type="销售出库"
						break;
					case 3:
						type="耗损出库"
						break;
				}
				var newRow = "<tr>" +
						"<td>"+obj[i].outStoreId+"</td><td>"+obj[i].foodName+"</td>" +
						"<td>"+obj[i].foodStandard+"</td><td>"+obj[i].className+"</td>" +
						"<td>"+type+"</td><td>"+obj[i].storageOutDate+"</td>" +
						"<td>"+obj[i].userName+"</td><td>"+obj[i].foodOutNum+"</td>" +
						"<td>"+obj[i].reaAmount+"</td>" +"<td>"+obj[i].remarks+"</td>" + "<td>";
				if(window.userPower==88888){
					newRow=newRow+"<a href='${ctx}/outStore/delete?id="+obj[i].outStoreId+"'>删除&nbsp;&nbsp;</a>"+
					"</td></tr>";
				}

				$("#table tr:last").after(newRow);

			}

		}
	</script>


</head>

<body>
<input type="hidden" id="count" value="${count}">
<div class="pagin">
	<br/>
	<br/>   <br/>
	<input type="text" id="condition" placeholder="请输入ID或者名称"><button id="find">搜索</button>
	<br/><br/>
	<table id="table" class="t1" style="width: 80%">
		<tr ><th colspan="11">出库列表</th></tr>
		<tr>
			<td>出库ID</td>
			<td>食品名称</td>
			<td>食品规格</td>
			<td>食品分类</td>
			<td>出库类型</td>
			<td>出库时间</td>
			<td>员工姓名</td>
			<td>出库数量</td>
			<td>实收金额</td>
			<td>备注</td>
			<td>操作</td>
		</tr>
	</table>
	<br/>
	<div id="Pagination" class="pagination"
		 style=" width: -moz-fit-content;width:-webkit-fit-content;width: fit-content;margin-left: auto;margin-right: auto;" ></div>
</div>
<%--<center>


			</tr>
			<c:forEach items="${outStoreList}" var="outStore">
				<tr>
					<td>${outStore.outStoreId }</td>
					<td>${outStore.foodName}</td>
					<td>${outStore.foodStandard }</td>
					<td>${outStore.className}</td>
					<td>
						<c:if test="${outStore.storageOutType==1}" >配送出库</c:if>
						<c:if test="${outStore.storageOutType==2}" >销售出库</c:if>
						<c:if test="${outStore.storageOutType==3}" >耗损出库</c:if>
					</td>
					<td>${outStore.storageOutDate }</td>
					<td>${outStore.overDate}</td>
					<td>${outStore.foodOutNum }</td>
					<td>${outStore.providerName }</td>
					<td>${outStore.remarks}</td>
					<td>
						<a href="${ctx}/outStore/delete?id=${outStore.outStoreId}">删除</a>
					</td>
				</tr>
			</c:forEach>
		</table>

</center>--%>
</body>
</html>